import request from '@/utils/request'

export const loginApi = (data) => request.post('/sys/login', data)
export const getUserInfoApi = () => request.get('/sys/profile')
export const updatePasswordApi = (data) => request({
  url: '/sys/user/updatePass',
  method: 'put',
  data
})

export const getUserDetailById = (id) => request.get(`/sys/user/${id}`)

export const getQRcodeApi = () => request('/sys/qrcodeKey')

export const getQRcodeTypeApi = (params) => request('/sys/qrcodeState', { params })
export const updateUserStaffPhotoAPI = data => request.put('/sys/updateStaffPhoto', data)

// 获取用户消息
export const getUserMessageAPI = () => request.get('/sys/message')
// 删除用户信息
export const delUserMessageAPI = id => request.delete(`/sys/message/${id}`)
// 已读消息
export const updateUserMessageAPI = id => request.put(`/sys/message/${id}`)
